import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  all: '/erp_meixingtiyu/arena/all',
  add: '/erp_meixingtiyu/arena/add',
  edit: '/erp_meixingtiyu/arena/edit',
  del: '/erp_meixingtiyu/arena/del',
  allArenas: '/erp_meixingtiyu/arena/allArenas',
  list: '/erp_meixingtiyu/arena_part/list',
  addPart: '/erp_meixingtiyu/arena_part/add',
  editPart: '/erp_meixingtiyu/arena_part/edit',
  delPart: '/erp_meixingtiyu/arena_part/del',
}

/**
 * 场地列表
 */
export function all (params) {
  return axios({
    url: api.all,
    method: 'get',
    params
  })
}

/**
 * 添加场地
 */
 export function add (params) {
  return axios({
    url: api.add,
    method: 'get',
    params
  })
}

/**
 * 编辑场地
 */
 export function edit (params) {
  return axios({
    url: api.edit,
    method: 'get',
    params
  })
}

/**
 * 删除场地
 */
 export function del (params) {
  return axios({
    url: api.del,
    method: 'get',
    params
  })
}

/**
 * 获取场地的所有半场列表
 */
 export function allArenas (params) {
  return axios({
    url: api.allArenas,
    method: 'get',
    params
  })
}

/**
 * 获取指定场地的所有半场分页列表
 */
 export function list (params) {
  return axios({
    url: api.list,
    method: 'get',
    params
  })
}

/**
 * 添加半场
 */
 export function addPart (params) {
  return axios({
    url: api.addPart,
    method: 'get',
    params
  })
}

/**
 * 添加半场
 */
 export function editPart (params) {
  return axios({
    url: api.editPart,
    method: 'get',
    params
  })
}

/**
 * 删除半场
 */
 export function delPart (params) {
  return axios({
    url: api.delPart,
    method: 'get',
    params
  })
}